package com.spica.spicaschool.ui.square

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.fragment.app.FragmentPagerAdapter
import com.spica.spicaschool.base.BaseFragment
import com.spica.spicaschool.databinding.FragmentSquareBinding


class SquareFragment : BaseFragment<FragmentSquareBinding>() {


    override fun setupViewBinding(
        inflater: LayoutInflater,
        container: ViewGroup?
    ): FragmentSquareBinding = FragmentSquareBinding.inflate(inflater, container, false)

    override fun init() {
        initView()
    }

    private fun initView() {
        viewBinding.viewpager.adapter =
            SquareFragmentAdapter(
                childFragmentManager,
                FragmentPagerAdapter.BEHAVIOR_RESUME_ONLY_CURRENT_FRAGMENT
            )
        viewBinding.tablayout.setupWithViewPager(viewBinding.viewpager)
    }


}
